import axios from "../utils/axios"
const provApi = async () => {
    const data = await axios({
        url: '/province/findAll',
    })
    return data
}
const cityApi=async(provinceId:number)=>{
    const data =await axios({
        url:'/city/'+provinceId+''
    })
    return data;
}
//根据市来查询主机构
const cityOragn=(cityId:number)=>{
    return axios({
        url:'/findOrganByCity/'+cityId+''
    })
}
// 分支机构
const branchData=(cityId:number,organId:number)=>{
    return axios({
        url:'/subOrgan/findSubOrganByCityAndOrgan',
        method:'post',
        data:{
            cityId:cityId,
            organId:organId
        }
    })
}
export {
    cityApi,
    provApi,
    cityOragn,
    branchData
}